package com.draven.member.service;

import com.draven.member.entity.Member;
import com.draven.member.mapper.MemberMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberService {

    @Autowired
    private MemberMapper memberMapper;

    public Member findById(Long id) {
        return memberMapper.findById(id);
    }

    public List<Member> findAll() {
        return memberMapper.findAll();
    }

    public void save(Member member) {
        memberMapper.insert(member);
    }

    public void update(Member member) {
        memberMapper.update(member);
    }

    public void deleteById(Long id) {
        memberMapper.deleteById(id);
    }
}